<?php

namespace Modules\ShopAdmin\Database\Seeders;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;

class AuthsTableSeederTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
/*********************************左侧栏******************************************/		
		$pid1 = DB::table('auth_rules')->insertGetId([
			'name'=>'商城管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-shangcheng',
			'pid'=>0,
			'level'=>1,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$pid2 = DB::table('auth_rules')->insertGetId([
			'name'=>'商品管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-shangpingouwudai',
			'pid'=>$pid1,
			'level'=>2,
			'created_at'=>date('Y-m-d H:i:s')
		]);
/***********************************商品分类******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/product_type/index',
			'name'=>'商品分类',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_type/store',
			'name'=>'添加',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_type/create_sublevel',
			'name'=>'添加子级',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_type/edit',
			'name'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_type/update',
			'name'=>'编辑提交',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_type/status',
			'name'=>'状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_type/sorts',
			'name'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
/***********************************商品属性******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/product_attrbute_key/index',
			'name'=>'商品属性',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_key/store',
			'name'=>'添加',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_key/edit',
			'name'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_key/update',
			'name'=>'编辑提交',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_key/status',
			'name'=>'状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_key/sorts',
			'name'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_key/destroy',
			'name'=>'删除',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);		
/*********************************商品属性值******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/product_attrbute_value/index',
			'name'=>'商品属性值',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_value/store',
			'name'=>'添加',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_value/edit',
			'name'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_value/update',
			'name'=>'编辑提交',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_value/status',
			'name'=>'状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_value/sorts',
			'name'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/product_attrbute_value/destroy',
			'name'=>'删除',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
/*********************************商品列表******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/product/index',
			'name'=>'商品列表',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/store',
			'name'=>'添加',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/edit',
			'name'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/update',
			'name'=>'编辑提交',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/status',
			'name'=>'状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/recommend_status',
			'name'=>'是否精品推荐',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/best_status',
			'name'=>'是否热卖单品',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/sorts',
			'name'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/destroy',
			'name'=>'删除',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/evaluate_list',
			'name'=>'评论列表',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/product/evaluate_status',
			'name'=>'评论状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
/***********************************会员管理****************************************/
		$pid2 = DB::table('auth_rules')->insertGetId([
			'name'=>'会员管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-yonghu1',
			'pid'=>$pid1,
			'level'=>2,
			'created_at'=>date('Y-m-d H:i:s')
		]);
/***********************************用户列表******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/user/index',
			'name'=>'用户列表',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);		
/***********************************图片管理****************************************/
		$pid2 = DB::table('auth_rules')->insertGetId([
			'name'=>'图片管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-tupian',
			'pid'=>$pid1,
			'level'=>2,
			'created_at'=>date('Y-m-d H:i:s')
		]);
/********************************轮播图列表******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/picture/index',
			'name'=>'轮播图列表',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/picture/store',
			'name'=>'添加',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/picture/edit',
			'name'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/picture/update',
			'name'=>'编辑提交',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/picture/status',
			'name'=>'状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/picture/open',
			'name'=>'是否往期',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/picture/sorts',
			'name'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/picture/destroy',
			'name'=>'删除',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
/***********************************订单管理****************************************/
		$pid2 = DB::table('auth_rules')->insertGetId([
			'name'=>'订单管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-dingdan',
			'pid'=>$pid1,
			'level'=>2,
			'created_at'=>date('Y-m-d H:i:s')
		]);
/********************************订单列表******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/order/index',
			'name'=>'订单列表',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/edit_address',
			'name'=>'编辑地址页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/edit_update',
			'name'=>'编辑地址提交',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/status',
			'name'=>'发货',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/order_detail',
			'name'=>'订单详情',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/order_complain_list',
			'name'=>'申诉记录',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/order_complain',
			'name'=>'通过/驳回',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/order_refund_info',
			'name'=>'退款页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/order/order_refund',
			'name'=>'退款数据处理',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
/********************************已发货订单******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/shipped_order/index',
			'name'=>'已发货订单',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
/***********************************咨询管理****************************************/
		$pid2 = DB::table('auth_rules')->insertGetId([
			'name'=>'咨询管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-icon-test1',
			'pid'=>$pid1,
			'level'=>2,
			'created_at'=>date('Y-m-d H:i:s')
		]);
/********************************咨询列表******************************************/
		$pid3 = DB::table('auth_rules')->insertGetId([
			'href'=>'shop/consult/index',
			'name'=>'咨询列表',
			'status'=>1,
			'auth_open'=>1,
			'pid'=>$pid2,
			'level'=>3,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/store',
			'name'=>'添加',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/edit',
			'name'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/update',
			'name'=>'编辑提交',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/status',
			'name'=>'状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/sorts',
			'name'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/destroy',
			'name'=>'删除',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/evaluate_index',
			'name'=>'咨询评价列表',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);	
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/evaluate_status',
			'name'=>'咨询评价状态',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
			'href'=>'shop/consult/evaluate_destroy',
			'name'=>'咨询评价删除',
			'status'=>0,
			'auth_open'=>1,
			'pid'=>$pid3,
			'level'=>4,
			'created_at'=>date('Y-m-d H:i:s')
		]);
    }
	
}
